package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.ruoyi.common.utils.StringOrListDeserializer;

import java.util.Date;
import java.util.List;

/**
 * 重点工作对象 work_items
 * 
 * @author ruoyi
 * @date 2025-01-12
 */
public class WorkItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 工作序号 */
    @Excel(name = "工作序号")
    private String serial;

    /** 工作标题 */
    @Excel(name = "工作标题")
    private String title;

    /** 工作描述 */
    @Excel(name = "工作描述")
    private String description;

    /** 负责部门 */
    @Excel(name = "负责部门")
    private String department;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 预计完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预计完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 完成进度(0-100) */
    @Excel(name = "完成进度")
    private Integer progress;

    /** 工作状态 */
    @Excel(name = "工作状态", readConverterExp = "pending=未开始,processing=进行中,completed=已完成")
    private String status;

    /** 相关图片URL，多个用逗号分隔 */
    private String imagesUrls;

    /** 图片列表（用于前端展示） */
    @JsonDeserialize(using = StringOrListDeserializer.class)
    private List<String> images;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setSerial(String serial) 
    {
        this.serial = serial;
    }

    public String getSerial() 
    {
        return serial;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setDepartment(String department) 
    {
        this.department = department;
    }

    public String getDepartment() 
    {
        return department;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setProgress(Integer progress) 
    {
        this.progress = progress;
    }

    public Integer getProgress() 
    {
        return progress;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setImagesUrls(String imagesUrls) 
    {
        this.imagesUrls = imagesUrls;
    }

    public String getImagesUrls() 
    {
        return imagesUrls;
    }

    public void setImages(List<String> images) 
    {
        this.images = images;
    }

    public List<String> getImages() 
    {
        return images;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("serial", getSerial())
            .append("title", getTitle())
            .append("description", getDescription())
            .append("department", getDepartment())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("progress", getProgress())
            .append("status", getStatus())
            .append("imagesUrls", getImagesUrls())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
